
--------------------------------------------------------------------
--Nombre:	SP_ActualizarMaterial
--Objetivo: Actualizar registros a la tabla Material
--Creacion    : TISI(GOS) 20130226
--------------------------------------------------------------------
ALTER PROCEDURE SP_ActualizarMaterial
(
  @IDMaterial bigint,
  @CodMate varchar(12),
  @TipoMate varchar(3),
  @FamiMate varchar(3),
  @SubFamiMate varchar(3),
  @CatMate varchar(3),
  @SubCatMate varchar(3),
  @DescMate varchar(250),
  @UniMedMate varchar(10),
  @CostoPromMate decimal(12,2),
  @PrecPromMate DECIMAL(12,2),
  @SaldActMate decimal(8,2),
  @StckMinMate decimal(8,2),
  @StckRepoMate DECIMAL(8,2),
  @EstadoMate int,
  --@UsuReg varchar(20),
  --@FecReg datetime,
  --@TermCnxReg varchar(50),
  @UsuMod varchar(20),
  --@FecMod datetime,
  @TermCnxMod varchar(50),
  @IDEmp INT,
  @IDSede BIGINT
)
AS
BEGIN
  UPDATE Material
  SET
  --IDMaterial = @IDMaterial,
    CodMate = @CodMate,
    TipoMate = @TipoMate,
    FamiMate = @FamiMate,
    SubFamiMate = @SubFamiMate,
    CatMate = @CatMate,
    SubCatMate = @SubCatMate,
    DescMate = @DescMate,
    UniMedMate = @UniMedMate,
    CostoPromMate = @CostoPromMate,
    PrecPromMate = @PrecPromMate,
    SaldActMate = @SaldActMate,
    StckMinMate = @StckMinMate,
    StckRepoMate = @StckRepoMate,
    EstadoMate = @EstadoMate,
    --UsuReg = @UsuReg,
    --FecReg = @FecReg,
    --TermCnxReg = @TermCnxReg,
    UsuMod = @UsuMod,
    FecMod = GETDATE(),
    TermCnxMod = @TermCnxMod,
    IDEmp = @IDEmp   ,
    IDSede = @IDSede
 WHERE
 IDMaterial = @IDMaterial
END
GO
  